#ifndef ACAPELLA_THREAD_TRAITS_H
#define ACAPELLA_THREAD_TRAITS_H


#ifdef ACAPELLA_WINDOWS
#	include <windows.h>
#else
#	include <pthread.h>
#endif

namespace acapella
{
namespace thread
{

class Thread_Windows;
class Thread_Linux;

template<typename osType>
struct _thread_traits{};

#ifdef ACAPELLA_WINDOWS
template<>
struct _thread_traits<acapella_os_windows>
{
	typedef HANDLE ThreadHandle;
	typedef void * ThreadParam;
	typedef DWORD (WINAPI *ThreadFunc)(ThreadParam);
	typedef Thread_Windows ThreadImpl;
    typedef acapella::delegate::functor<int(ThreadParam)> functor_type;
};
#else
template<>
struct _thread_traits<acapella_os_linux>
{
	typedef pthread_t ThreadHandle;
	typedef void * ThreadParam;
	typedef void * (*ThreadFunc)(ThreadParam);
	typedef Thread_Linux ThreadImpl;
    typedef acapella::delegate::functor<int(ThreadParam)> functor_type; 
};
#endif

typedef _thread_traits<acapella_os_type> thread_traits;


}
}



#endif
